package com.example.demo.util;

import net.bytebuddy.utility.RandomString;

import java.util.Random;

public class RandomUtil {
    public static String randomInteger(int length) {
        StringBuffer sb = new StringBuffer();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            sb.append(random.nextInt(10));
        }
        return sb.toString();
    }

    public static void main(String[] args) {
        for (int i = 0; i<100; i++)
        System.out.println(randomInteger(4));
    }
}
